export interface ResponseData{
  code:number,
  message:string,
  ok:boolean
}

// 定义SKU对象的ts类型
export interface Attr{
  id?:number,
  attrId:number|string, //平台属性的ID
  valueId:number|string, //属性值的ID
}
export interface SaleAttr{
  id?:number,
  saleAttrId:number|string,//属性ID
  saleAttrValueId:number|string,//属性值的ID
}
export interface SkuData {
  category3Id?: string|number, //三级分类的id
  spuId?: string|number, //已有的SPU的id
  tmId?:  string|number, //品牌的id
  skuName?: string,//SKU名字
  price?:  string|number, //SKU价格
  weight?: string|number, //SKU重量
  skuDesc?:string, //SKU描述
  skuAttrValueList?: Attr[],  //平台属性的收集
  skuSaleAttrValueList?:SaleAttr[], //销售属性
  skuDefaultImg?:string, //售卖SKU图片的地址
  isSale?:number,  //控制商品的上架与下架
  id?:number
}

// 获取SKU接口返回的数据ts类型
export interface SkuResponseData extends ResponseData{
  data:{
    records:SkuData[],
    total: number,
    size: number,
    current: number,
    orders: [],
    optimizeCountSql: boolean,
    hitCount: boolean,
    countId: null,
    maxLimit: null,
    searchCount: boolean,
    pages: number
  }
}

// 获取SKU商品详情接口的ts类型
export interface SkuInfoData extends ResponseData{
  data:SkuData
}